package com.uniview.entity.po;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 
 * 系统菜单资源类
 * 
 * @author Qingtian Lei
 *
 */
@Entity
@Table(name = "sd_menus")
public class Menu implements Serializable {

	private static final long serialVersionUID = 1418409787432331343L;

	public int menuId;

	public String menuName; // 菜单名称

	public String menuUrl; // 菜单路径

	public String menuIcon; // 菜单图标

	public int menuType; // 菜单类型 1:左侧菜单 2:上方菜单

	public int menuSort; // 排序

	public Date created; // 创建时间

	public Date modified; // 修改时间

	public int disabled; // 是否启用 0不启用 1 启用
	
	public Integer parentId;  //父节点id
	
	//子节点的集合
	public List<Menu> childrenMenus = new ArrayList<Menu>();


	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public int getMenuId() {
		return menuId;
	}


	public void setMenuId(int menuId) {
		this.menuId = menuId;
	}


	public String getMenuName() {
		return menuName;
	}


	public void setMenuName(String menuName) {
		this.menuName = menuName;
	}


	public String getMenuUrl() {
		return menuUrl;
	}


	public void setMenuUrl(String menuUrl) {
		this.menuUrl = menuUrl;
	}


	public String getMenuIcon() {
		return menuIcon;
	}


	public void setMenuIcon(String menuIcon) {
		this.menuIcon = menuIcon;
	}


	public int getMenuType() {
		return menuType;
	}


	public void setMenuType(int menuType) {
		this.menuType = menuType;
	}


	public int getMenuSort() {
		return menuSort;
	}


	public void setMenuSort(int menuSort) {
		this.menuSort = menuSort;
	}


	public Date getCreated() {
		return created;
	}


	public void setCreated(Date created) {
		this.created = created;
	}


	public Date getModified() {
		return modified;
	}


	public void setModified(Date modified) {
		this.modified = modified;
	}


	public int getDisabled() {
		return disabled;
	}


	public void setDisabled(int disabled) {
		this.disabled = disabled;
	}


	public Integer getParentId() {
		return parentId;
	}


	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	@Transient
	public List<Menu> getChildrenMenus() {
		return childrenMenus;
	}


	public void setChildrenMenus(List<Menu> childrenMenus) {
		this.childrenMenus = childrenMenus;
	}

}